/**
 * 
 */
package com.fyfeng.android.tools.view;

import android.app.Activity;
import android.widget.TextView;

/**
 * @author YUZHENGWEI Date: 2013-4-3 Email: yzw1007@gmail.com QQ: 136025011
 * 
 */

public class TextViewUtils {

	public static void setText(final Activity activity, int viewId, int resId) {
		TextView tview = (TextView) activity.findViewById(viewId);
		tview.setText(resId);
	}

	public static void setText(final Activity activity, int viewId, CharSequence text) {
		TextView tview = (TextView) activity.findViewById(viewId);
		tview.setText(text);
	}

	public static CharSequence getText(final Activity activity, int viewId) {
		TextView tview = (TextView) activity.findViewById(viewId);
		return tview.getText();
	}
	
	public static void setTextColor(final Activity activity, final int viewId, final int color){
		
		TextView tview = (TextView) activity.findViewById(viewId);
		tview.setTextColor(color);
		
	}
	
}
